<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    

      

       <script>  
                
                let objData={
                 aa:1,
                 cc:"222",
                 objTwo:{
                     name:"xiaoming"
                 },
                 dfff:[1,5,6]
               }

             function depColen(objObj){
                 if(typeof objObj !=='object' || objObj===null){
                     return  objObj
                 } 
           
                 let objList=new objObj.constructor()
                 for(let key in objObj){
                        objList[key]=depColen(objObj[key])
                  }
                 return objList
             }   

             let dataData=depColen(objData)
             dataData.dfff.push(999999)
             console.log(dataData)
             console.log(objData)

             
             let oneData=[1,2]
             let twoData={a:1}
             console.log(oneData.constructor())
             console.log(twoData.constructor()) 

     

       </script>

</body>
</html>